package com.icarus.entity;

import javax.swing.*;

/**
 * 爆炸效果
 */
public class Bomb {



    //爆炸的坐标
    private int x;
    private int y;

    //爆炸动画次数
    private int totalCount = 6;      //6连发

    //效果图开始爆炸
    private int beginCount;

    //爆炸图标
    private ImageIcon icon;


    //爆炸状态 0没爆完，1已经爆炸完
    private int stauts;


    public void boom() {

        if(beginCount>6) {
            // 大于6的话说明爆炸结束了
            this.stauts = 1;
        } else {
            this.beginCount++;

            icon = new ImageIcon("images/boom/boom0"+beginCount+".png");
        }

    }


    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getBeginCount() {
        return beginCount;
    }

    public void setBeginCount(int beginCount) {
        this.beginCount = beginCount;
    }

    public ImageIcon getIcon() {
        return icon;
    }

    public void setIcon(ImageIcon icon) {
        this.icon = icon;
    }

    public int getStauts() {
        return stauts;
    }

    public void setStauts(int stauts) {
        this.stauts = stauts;
    }

}
